#pragma once

struct PathInfo
{
	PathInfo(int pathIdx, int segIdx)
		:PathIdx(pathIdx),SegIdx(segIdx)
	{}

	int	PathIdx;
	int	SegIdx;
};

class PathRecyclePool
{
public:
	PathRecyclePool(void);
	~PathRecyclePool(void);

	PathInfo FindPath(const StageMap& map, int beginBrickIdx, int endBrickIdx);
	const MapPath& At(int idx) const;
	void ReleasePath (int idx);
	int Size() const;	

private:
	int FindFreePath();

	std::vector<MapPath>	_pool;
	std::list<int>			_freeList;
	PathFinder				_pathFinder;
};
